<?php $this->load->view("general/header");?>
<script src="<?php echo base_url();?>js/hitungBensin.js"></script>
<div id="create_invoice" class="page_">
    <div class="form">              
        <div class="form_header">Tambah Data Laporan bensin</div>
        <div class="form_header_right"></div>
        
        <div class="form_header_right1"></div>
        <div class="content_data">
        <form method="post" action="<?php echo site_url("report/bensin");?>">
           
			<div class="row">
            	<strong>Bertanda * harus diisi</strong>
            </div>
          	<div class="row">
            	<div class="col1">Staff</div>
                <div class="col2"><?php echo get_username($this->session->userdata("user_id"));?> 
                	
                </div>
			</div>
             <div class="row">
            	<div class="col1">Nama Supir</div>
                <div class="col2">
                	<select id="jenis" name="jenis">
                    	<?php foreach ($driver as $driver1){?>
                                <option value="<?php echo $driver1['driver_id'];?>"><?php echo $driver1['name'];?></option>
                            <?php }?>
                        
                    </select> 
                </div>
			</div>
            <div class="row">
            	<div class="col1">Mobil</div>
                <div class="col2">
                	<select id="mobil" name="mobil">
                    	<?php foreach ($car as $car1){?>
                                <option value="<?php echo $car1['car_id'];?>"><?php echo $car1['produsen'] . " - " .$car1['model'] . " - " .$car1['warna'] ." - " . $car1['car_license'];?></option>
                            <?php }?>
                        
                    </select> 
                </div>
			</div>
            <div class="row">
            	<div class="col1">Konsumsi Bahan Bakar/KM*</div>
                <div class="col2"><input type="text" name="perKM" style="text-align:right" onkeyup="javascript:hitungBensinPerKM(this.form)"/>  Litre
                	<div class="errorField"><?php echo form_error("perKM");?></div>
                </div>
			</div>
            
            <div class="row">
            	<div class="col1">KM awal*</div>
                <div class="col2"><input type="text" name="KMawal" style="text-align:right" onkeyup="javascript:hitungBensinKMawal(this.form)"/> KM
                	<div class="errorField"><?php echo form_error("KMawal");?></div>
                </div>
			</div>
            <div class="row">
            	<div class="col1">KM akhir*</div>
                <div class="col2"><input type="text" name="KMakhir" style="text-align:right" onkeyup="javascript:hitungBensinKMakhir(this.form)"/> KM
                	<div class="errorField"><?php echo form_error("KMakhir");?></div>
                </div>
			</div>
            <div class="row">
            	<div class="col1">Harga Bahan Bakar*</div>
                <div class="col2"><input type="text" name="hargaBensin" style="text-align:right" onkeyup="javascript:hitungBensinHarga(this.form)"/> Rupiah
                	<div class="errorField"><?php echo form_error("hargaBensin");?></div>
                </div>
			</div>
        	<div class="row">
            	<div class="col1">Uang Bensin DIpakai*</div>
                <div class="col2"><input type="text" name="bensinPakai" style="text-align:right" onkeyup="javascript:hitungBensinDipakai(this.form)"/></div> <b>Rupiah</b>
                	<div class="errorField"><?php echo form_error("bensinPakai");?></div>
			</div>
            <div class="row">
                <div class="col1">Jumlah rugi/untung</div> 
                <div class="col2" id="hasil"><input type="text" name="hasil" readonly style="text-align:right"/> Rupiah</div>
                   
                
            </div>
            <div class="row">
                <div class="col1">Status</div> 
                <div class="col2" id="statMan"><input type="text" name="statman" readonly style="text-align:right"/></div>
            </div>
        </div>
        <div class="title" >
          	<input type="submit" name="btnSave" value="Save" class="button_red" />
        </div>
        <div class="success"><?php echo (isset($success))?$success:"";?>&nbsp;</div>
        </form>
       
    </div>
    
</div>
<?php $this->load->view("general/footer");?>